package com.zhouheng.springbootdesignpattern.decoratorpattern;

/**
 * 装饰者抽象类
 *
 * 维持一个指向被装饰对象示例的引用，并继承被装饰者对象基类
 *
 * @author 周恒
 * @date 20190614 10:54:09
 * @since v1.0
 */
public abstract class DecoratorPerson implements IPerson {

    protected IPerson IPerson;

    public void setIPerson(IPerson IPerson){
        this.IPerson = IPerson;
    }

    @Override
    public void eat() {
        IPerson.eat();
    }

    @Override
    public void drink() {

    }

}
